package org.lwxyz.api;

import org.lwxyz.Common.Status;
import org.lwxyz.service.CoinService;
import org.lwxyz.utils.StringUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuwei
 * @version 1.0-SNAPSHOT
 * @description
 * @date
 */
@RestController
public class CoinController {

    @RequestMapping(value = "/start")
    public String start(@RequestParam(value = "change", required = false)String change) {
        if (StringUtil.isNotBlank("change")) {

        }
        Status.STATUS = "start";
        CoinService.analysis();
        return "success";
    }

    @RequestMapping(value = "/stop")
    public String stop(){
        Status.STATUS = "stop";
        return "stop";
    }
}
